10 DEFINT A-Z: DIM N$(15): DIM IMG(18,15): DIM IMGT(18): R1=0: R2=0
11 GOSUB 300: KEY OFF: SCREEN 2: CLS: LOCATE 1,1,1
20 INPUT "Input Number: ",IN$: L=LEN(IN$)
30 IF IN$="" THEN GOTO 20 ELSE IF L > 16 THEN PRINT "Input too long.": GOTO 80
40 LOCATE ,,0: X=0: Y=16
50 IF L < 8 THEN S1$=IN$: GOSUB 200: GOTO 80
60 S1$=MID$(IN$,1,L-8): GOSUB 200: IF R1<>0 THEN ID=14: GOSUB 400
70 S1$=MID$(IN$,L-8+1,8): GOSUB 200
80 WHILE INPUT$(1)="": WEND : SCREEN 0: END
100 IF VAL(S2$)=0 THEN R2=0: RETURN
110 R2=1: OZ=0: L2=LEN(S2$): FOR I=L2 TO 1 STEP -1
120 D=VAL(MID$(S2$, L2+1-I, 1))
130 IF D=0 THEN OZ=1: GOTO 170
140 IF OZ<>0 THEN ID=0: GOSUB 400: OZ=0
150 ID=D: GOSUB 400
160 IF I=2 THEN ID=10:GOSUB 400 ELSE IF I=3 THEN ID=11:GOSUB 400 ELSE IF I=4 THEN ID=12:GOSUB 400
170 NEXT I: RETURN
200 L1=LEN(S1$): IF L1<=4 THEN S2$=S1$: GOSUB 100: R1=R2: RETURN
210 R1=0: S2$=MID$(S1$,1,L1-4): GOSUB 100: R1=R2
220 IF R2<>0 THEN ID=13:GOSUB 400
230 S2$=MID$(S1$,L1-4+1,4): GOSUB 100: R1=R1 OR R2
240 RETURN
300 FOR I=0 TO 14: IMG(0,I)=16: IMG(1,I)=16
310 FOR J=2 TO 17: READ A,B:IMG(J,I)=CVI(CHR$(A)+CHR$(B))
320 NEXT J: NEXT I: RETURN
400 FOR IMGTA=0 TO 17: IMGT(IMGTA)=IMG(IMGTA,ID): NEXT IMGTA
410 PUT (X,Y),IMGT,PSET: IF X>=640 THEN X=0: Y=Y+16 ELSE X=X+16
420 RETURN
500 DATA 31,240,1,0,127,254,65,2,157,116,1,0,29,112,2,128
510 DATA 12,96,50,24,193,6,15,224,0,64,2,128,1,0,0,128
520 DATA 1,0,127,252,1,0,63,248,0,0,127,254,64,2,159,244
530 DATA 0,0,31,240,16,16,16,16,31,240,8,32,4,68,255,254
540 DATA 0,40,0,36,255,254,0,32,63,160,0,32,127,224,0,32
550 DATA 63,160,32,160,36,160,36,160,36,146,10,18,17,138,96,134
560 DATA 4,0,8,32,31,240,2,16,2,4,255,254,4,128,8,64
570 DATA 8,32,23,208,32,14,192,68,15,224,0,0,0,16,63,248
580 DATA 0,32,60,32,32,252,32,36,61,254,32,36,32,252,60,32
590 DATA 32,32,33,252,254,32,16,36,37,254,126,32,2,32,0,32
600 DATA 16,0,16,8,23,252,32,128,32,128,96,128,160,136,39,252
610 DATA 33,8,33,8,33,8,34,8,34,8,34,8,63,254,32,0
620 DATA 0,32,124,32,68,32,73,252,72,32,80,32,72,36,75,254
630 DATA 68,32,69,36,69,36,105,36,81,36,65,36,65,252,65,4
640 DATA 32,128,16,128,64,136,32,252,15,128,16,132,96,132,32,124
650 DATA 33,0,1,4,255,254,3,128,5,64,25,48,225,14,1,0
660 DATA 32,68,39,228,36,68,36,84,252,84,39,212,34,20,42,20
670 DATA 55,212,34,84,226,84,34,68,36,68,37,68,168,148,64,8
680 DATA 0,64,4,64,254,72,16,252,16,136,16,136,125,16,18,16
690 DATA 16,32,16,32,30,80,240,80,64,136,1,8,2,6,12,0
700 DATA 16,64,16,64,16,160,16,160,253,16,18,8,21,246,28,0
710 DATA 48,8,211,252,18,8,18,8,18,8,18,8,83,248,34,8
720 DATA 8,0,8,4,15,254,16,64,16,64,48,136,83,252,146,8
730 DATA 18,8,18,8,19,248,18,8,18,8,18,8,19,248,18,8
740 DATA 8,16,8,56,11,192,16,64,16,64,48,64,80,68,159,254
750 DATA 16,64,16,64,16,64,16,64,16,64,16,64,16,64,16,64
760 DATA 0,0,0,4,255,254,2,0,2,0,2,16,3,248,2,16
770 DATA 2,16,4,16,4,16,4,16,8,16,16,16,32,160,64,64
780 DATA 8,0,8,0,11,248,16,16,16,32,48,64,80,128,145,0
790 DATA 18,0,18,0,20,0,20,0,20,2,20,2,19,254,16,0

